package com.lansi.fb.person.bean;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;


/**
 * 人员信息实体类
 * @author Administrator
 *
 */
public class Person implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = -3578607032856234375L;
	private Integer id;
	private String username;
	private String sex;
	private String sexStr;
	private Integer age;
	private String worktype;
	private String worktypeStr;
	private String sn;
	private String level;
	private String levelStr;
	private String cardid;
	private String userid;
	private String picture;
	private String memo;
	private Date ctime;
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getSex() {
		return sex;
	}
	public void setSex(String sex) {
		this.sex = sex;
	}
	public String getSexStr() {
		return sexStr;
	}
	public void setSexStr(String sexStr) {
		this.sexStr = sexStr;
	}
	public Integer getAge() {
		return age;
	}
	public void setAge(Integer age) {
		this.age = age;
	}
	public String getWorktype() {
		return worktype;
	}
	public void setWorktype(String worktype) {
		this.worktype = worktype;
	}
	public String getWorktypeStr() {
		return worktypeStr;
	}
	public void setWorktypeStr(String worktypeStr) {
		this.worktypeStr = worktypeStr;
	}
	public String getSn() {
		return sn;
	}
	public void setSn(String sn) {
		this.sn = sn;
	}
	public String getLevel() {
		return level;
	}
	public void setLevel(String level) {
		this.level = level;
	}
	public String getLevelStr() {
		return levelStr;
	}
	public void setLevelStr(String levelStr) {
		this.levelStr = levelStr;
	}
	public String getCardid() {
		return cardid;
	}
	public void setCardid(String cardid) {
		this.cardid = cardid;
	}
	public String getUserid() {
		return userid;
	}
	public void setUserid(String userid) {
		this.userid = userid;
	}
	public String getPicture() {
		return picture;
	}
	public void setPicture(String picture) {
		this.picture = picture;
	}
	public String getMemo() {
		return memo;
	}
	public void setMemo(String memo) {
		this.memo = memo;
	}
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCtime() {
		return ctime;
	}
	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}
	public Person() {
		
	}
	
	public Person(Integer id, String username, String sex, String sexStr, Integer age, String worktype,
			String worktypeStr, String sn, String level, String levelStr, String cardid, String userid, String picture,
			String memo, Date ctime) {
		super();
		this.id = id;
		this.username = username;
		this.sex = sex;
		this.sexStr = sexStr;
		this.age = age;
		this.worktype = worktype;
		this.worktypeStr = worktypeStr;
		this.sn = sn;
		this.level = level;
		this.levelStr = levelStr;
		this.cardid = cardid;
		this.userid = userid;
		this.picture = picture;
		this.memo = memo;
		this.ctime = ctime;
	}
	@Override
	public String toString() {
		return "Person [id=" + id + ", username=" + username + ", sex=" + sex + ", sexStr=" + sexStr + ", age=" + age
				+ ", worktype=" + worktype + ", worktypeStr=" + worktypeStr + ", sn=" + sn + ", level=" + level
				+ ", levelStr=" + levelStr + ", cardid=" + cardid + ", userid=" + userid + ", picture=" + picture
				+ ", memo=" + memo + ", ctime=" + ctime + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((age == null) ? 0 : age.hashCode());
		result = prime * result + ((cardid == null) ? 0 : cardid.hashCode());
		result = prime * result + ((ctime == null) ? 0 : ctime.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((level == null) ? 0 : level.hashCode());
		result = prime * result + ((levelStr == null) ? 0 : levelStr.hashCode());
		result = prime * result + ((memo == null) ? 0 : memo.hashCode());
		result = prime * result + ((picture == null) ? 0 : picture.hashCode());
		result = prime * result + ((sex == null) ? 0 : sex.hashCode());
		result = prime * result + ((sexStr == null) ? 0 : sexStr.hashCode());
		result = prime * result + ((sn == null) ? 0 : sn.hashCode());
		result = prime * result + ((userid == null) ? 0 : userid.hashCode());
		result = prime * result + ((username == null) ? 0 : username.hashCode());
		result = prime * result + ((worktype == null) ? 0 : worktype.hashCode());
		result = prime * result + ((worktypeStr == null) ? 0 : worktypeStr.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Person other = (Person) obj;
		if (age == null) {
			if (other.age != null)
				return false;
		} else if (!age.equals(other.age))
			return false;
		if (cardid == null) {
			if (other.cardid != null)
				return false;
		} else if (!cardid.equals(other.cardid))
			return false;
		if (ctime == null) {
			if (other.ctime != null)
				return false;
		} else if (!ctime.equals(other.ctime))
			return false;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (level == null) {
			if (other.level != null)
				return false;
		} else if (!level.equals(other.level))
			return false;
		if (levelStr == null) {
			if (other.levelStr != null)
				return false;
		} else if (!levelStr.equals(other.levelStr))
			return false;
		if (memo == null) {
			if (other.memo != null)
				return false;
		} else if (!memo.equals(other.memo))
			return false;
		if (picture == null) {
			if (other.picture != null)
				return false;
		} else if (!picture.equals(other.picture))
			return false;
		if (sex == null) {
			if (other.sex != null)
				return false;
		} else if (!sex.equals(other.sex))
			return false;
		if (sexStr == null) {
			if (other.sexStr != null)
				return false;
		} else if (!sexStr.equals(other.sexStr))
			return false;
		if (sn == null) {
			if (other.sn != null)
				return false;
		} else if (!sn.equals(other.sn))
			return false;
		if (userid == null) {
			if (other.userid != null)
				return false;
		} else if (!userid.equals(other.userid))
			return false;
		if (username == null) {
			if (other.username != null)
				return false;
		} else if (!username.equals(other.username))
			return false;
		if (worktype == null) {
			if (other.worktype != null)
				return false;
		} else if (!worktype.equals(other.worktype))
			return false;
		if (worktypeStr == null) {
			if (other.worktypeStr != null)
				return false;
		} else if (!worktypeStr.equals(other.worktypeStr))
			return false;
		return true;
	}
	
	
}
